package com.company.emallbackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.company.emallbackend.entity.Order;
import com.company.emallbackend.entity.dto.OrderDTO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hanlijian
 * @since 2023-01-12
 */
public interface IOrderService extends IService<Order> {

    /**
     * 下单
     * @param orderDTO
     */
    void addOrder(OrderDTO orderDTO, HttpServletResponse response);

    /**
     * 查询我的订单列表
     * @return
     */
    List<Order> getMyOrderList();

    /**
     * 异步回调
     * @param request
     */
    void payNotify(HttpServletRequest request);

    /**
     * 根据订单号查询订单
     * @param orderNo
     * @return
     */
    String queryOrder(String orderNo);

    /**
     * 查询已支付商品
     * @return
     */
    List<Order> queryPayOrder();

    /**
     * 根据订单id发货商品
     * @param orderId
     */
    void deliverGoods(Integer orderId);
}
